package libra.servletPlugins.unAnno;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

/**
 * 自定义过滤器,用于多次读取request中的请求体json
 * @author libra
 */
public class MyFilter implements Filter {
    public void init(FilterConfig filterConfig) throws ServletException {
    	System.out.println("DubboConsumerSpringMVC.MyFilter...init");
    }
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    	System.out.println("DubboConsumerSpringMVC.MyFilter...doFilter");
    	chain.doFilter(request, response);
    }
    public void destroy() {
    	System.out.println("DubboConsumerSpringMVC.MyFilter...destroy");
    }
}